sp = 0;
ep = 0;

function selectsp(e) {
    sp = e;
    $('#spbutton').text($('#spbtn' + e).text());
    show_select_card();
}

function selectep(e) {
    ep = e;
    $('#epbutton').text($('#epbtn' + e).text());
    show_select_card();
}

function show_select_card() {
    console.log(sp + ' ' + ep);
    $('.allbus').hide();
    if (sp == 0 && ep == 0) {
        $('.allbus').show();
    }
    else if (sp == 0) {
        $('.ep' + ep).show();
    }
    else if (ep == 0) {
        $('.sp' + sp).show();
    }
    else {
        $('.sp' + sp + '.ep' + ep).show()
    }
}

$(function() {
    screen_height = $(window).height();
    nav_height = $('#navbar').height();
    $('#main_container').height(screen_height - nav_height);
})